package com.跳台阶问题;

import java.util.ArrayList;
import java.util.List;

public class Solution {
	List<List<Integer>> result = new ArrayList<List<Integer>>();

	public int JumpFloor(int target) {
		int[] step = { 1, 2 };
		List<Integer> list = new ArrayList<Integer>();
		Find(step, target, 0, list);
        
		return result.size();

	}

	public void Find(int step[], int n, int start, List<Integer> list) {
		if (n < 0)
			return;
		else if (n == 0) {
			result.add(new ArrayList(list));
		} else {
			for (int i = 0; i < step.length; i++) {
				list.add(step[i]);
				Find(step, n - step[i], i, list);
				list.remove(list.size() - 1);
				
			}
		}
	}
}
